package com.yunfei.api.user.param;

import com.yunfei.api.user.contants.ValitationConstant;
import com.yunfei.contants.ValitationConstantMessage;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Pattern;

/**
 * 密码重置功能
 */
public class AccountForgetPasswordParam implements java.io.Serializable{
    private String token;
    @Pattern(regexp=ValitationConstant.MOBILE_REG, message= ValitationConstantMessage.MOBILE_REG_MESSAGE)
    private String mobile;
    @NotEmpty(message = ValitationConstantMessage.CODE_MESSAGE)
    private String code;//验证码
    @Pattern(regexp = ValitationConstant.PASSWORD_REG,message = ValitationConstantMessage.PASSWORD_REG_MESSAGE)
    private String password;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}